﻿@using EC.Entity.Enum;
@{
    Layout = "~/Views/Shared/_Dialog.cshtml";
}
<section class="container-fluid" style="background-color: white;">
    <form class="form-horizontal" id="form">
        <div class="tab-content">
            <div class="tab-pane fade in active" id="home">
                <div class="form-group m20_t">
                    <label class="wd100 control-label"><span class="WdateFmtErr">*</span>Google验证码：</label>
                    <div class="wd200">
                        <input class="form-control" type="text" name="verifyCode" maxlength="10" value="" autocomplete="off" placeholder="">
                    </div>
                </div>
            </div>
        </div>
    </form>
</section>
@section footerScript{
    <script type="text/javascript">
        var parent = artDialog.open.origin;

        function save() {

            var cover = FlashPay.UI.Mask({
                obj: $("body"),
                opacity: 0.5
            });

            var account = parent.$("input[name='account']").val();
            var password = parent.$("input[name='password']").val();

            var data = $("#form").serializeJSON();
            data.account = account;
            data.password = password;

            FlashPay.Util.Ajax({
                type: "POST",
                url: "/Account/Login",
                data: data,
                success: function (res) {
                    if (res.success) {
                        cover.Remove();
                        FlashPay.UI.DialogOpener().go();
                        FlashPay.UI.CloseDialog();
                    } else {
                        cover.Remove();
                        FlashPay.UI.Tip_short_warning("操作失败！" + res.message);
                    }
                },
                error: function (json) {
                    cover.Remove();
                    FlashPay.UI.Tip_warning("操作失败！请查看网络，请重试。");
                }
            });

        }
    </script>
}